<clr-modal [(clrModalOpen)]="modalOpened" [clrModalSize]="'lg'">
  <h3 class="modal-title">{{title}}</h3>
  <div class="modal-body">
    <form #ngForm="ngForm" clrForm clrLayout="horizontal">
      <clr-select-container>
        <label class="required">{{'DAEMONSET_ADMIN.CREATE.APP' | translate}}</label>
        <select id="app_id" clrSelect [(ngModel)]="daemonset.appId" [disabled]="actionType==1" name="app_id">
          <option *ngFor="let app of apps" [ngValue]="app.id" [selected]="app.id === daemonset.appId">{{app.name}}
          </option>
        </select>
      </clr-select-container>
  
      <clr-input-container>
        <label class="required">{{'TITLE.NAME' | translate}}</label>
        <input clrInput type="text" id="daemonset_name" [(ngModel)]="daemonset.name" name="daemonset_name" size="64"
          required [readonly]="actionType==1" pattern="[a-z]([-a-z0-9]*[a-z0-9])?" maxlength="64" (keyup)='handleValidation()'>
          <clr-control-error>
            {{'DAEMONSET_ADMIN.CREATE.RULE' | translate}}[a-z]([-a-z0-9]*[a-z0-9])?
          </clr-control-error>
      </clr-input-container>
    
        <div class="clr-form-control clr-row">
          <label for="deployment_metadata" class="clr-control-label">{{'DAEMONSET_ADMIN.CREATE.METADATA' | translate}}</label>
          <div class="clr-control-container clr-col-md-10 clr-col-12">
            <wayne-ace-editor-box></wayne-ace-editor-box>
          </div>
        </div>
       
        <clr-textarea-container>
          <label>{{'TITLE.DESCRIPTION' | translate}}</label>
          <textarea id="daemonset_description" clrTextarea [(ngModel)]="daemonset.description" name="daemonset_description" rows="3"></textarea>
        </clr-textarea-container>
       
    </form>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-outline" (click)="onCancel()">{{'BUTTON.CANCEL' | translate}}</button>
    <button type="button" class="btn btn-primary" [disabled]="!isValid"
            (click)="onSubmit()">{{'BUTTON.SUBMIT' | translate}}</button>
  </div>
</clr-modal>
